import 'package:Sayagh/news/Categories.dart';
import 'package:Sayagh/news/Posts.dart';
import 'package:Sayagh/tablepress/goods/Goods.dart';
import 'package:flutter/material.dart';
import 'package:Sayagh/i18n/i18nLocale.dart';
import 'package:Sayagh/Configs.dart';
import 'package:Sayagh/tablepress/Cities.dart';
class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
//      floatingActionButton: FloatingActionButton(onPressed:()=> inoChiMigi(),
//                    ),
      appBar: AppBar( title: asnafHeader,centerTitle: false,),
      drawer: Drawer(
        child: ListView(
          children: <Widget>[
           
            Text(
              i18nLocale[ourLocale]['dashboard'],
              textDirection: TextDirection.rtl,
              textAlign: TextAlign.center,
            ),
            ListTile(
              title: Text(i18nLocale[ourLocale]['citiesPrices'],style: TextStyle(fontFamily: "Sahel",color: Colors.deepOrange),),
              trailing: Icon(Icons.monetization_on),
              onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => Cities()),),
            ),
            Divider(),
            ListTile(
              title: Text(i18nLocale[ourLocale]['attentions']),
              trailing: Icon(Icons.warning),
                   onTap: () => Navigator.push(context,
                       MaterialPageRoute(builder: (context) => WpPosts("http://sayagh.asnafhormozgan.ir/wp-json/wp/v2/posts",5))),
            ),
            ListTile(
              title: Text(i18nLocale[ourLocale]['news']),
              trailing: Icon(Icons.announcement),
                   onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => WpCategories("$website/wp-json/wp/v2/categories")),),
            ),

            Divider(),
            ListTile(
              title: Text(i18nLocale[ourLocale]['reportSeller']),
              trailing: Icon(Icons.block),
              onTap: () => launchURL("http://sayagh.asnafhormozgan.ir/complaint_reg",
                  webView: true)),
            ListTile(
              title: Text(i18nLocale[ourLocale]['aboutUs']),
              trailing: Icon(Icons.live_help),
              onTap: () => launchURL("http://sayagh.asnafhormozgan.ir/contact",
                  webView: true)),


          ],
        ),
      ),
    body: Goods("http://sayagh.asnafhormozgan.ir",'essentionals',i18nLocale[ourLocale]['essentials']),
    );
  }
}

